3.384 \(\int \frac{(d+e x^r)^2 (a+b \log (c x^n))}{x^5} \, dx\)

Optimal. Leaf size=135 \[ -\frac{d^2 \left (a+b \log \left (c x^n\right )\right )}{4 x^4}-\frac{2 d e x^{r-4} \left (a+b \log \left (c x^n\right )\right )}{4-r}-\frac{e^2 x^{-2 (2-r)} \left (a+b \log \left (c x^n\right )\right )}{2 (2-r)}-\frac{b d^2 n}{16 x^4}-\frac{2 b d e n x^{r-4}}{(4-r)^2}-\frac{b e^2 n x^{-2 (2-r)}}{4 (2-r)^2} \]

[Out]

-(b*d^2*n)/(16*x^4) - (b*e^2*n)/(4*(2 - r)^2*x^(2*(2 - r))) - (2*b*d*e*n*x^(-4 + r))/(4 - r)^2 - (d^2*(a + b*L
og[c*x^n]))/(4*x^4) - (e^2*(a + b*Log[c*x^n]))/(2*(2 - r)*x^(2*(2 - r))) - (2*d*e*x^(-4 + r)*(a + b*Log[c*x^n]
))/(4 - r)

________________________________________________________________________________________

Rubi [A]  time = 0.163582, antiderivative size = 115, normalized size of antiderivative = 0.85, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {270, 2334, 12, 14} \[ -\frac{1}{4} \left (\frac{d^2}{x^4}+\frac{8 d e x^{r-4}}{4-r}+\frac{2 e^2 x^{-2 (2-r)}}{2-r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{b d^2 n}{16 x^4}-\frac{2 b d e n x^{r-4}}{(4-r)^2}-\frac{b e^2 n x^{-2 (2-r)}}{4 (2-r)^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x^5,x]

[Out]

-(b*d^2*n)/(16*x^4) - (b*e^2*n)/(4*(2 - r)^2*x^(2*(2 - r))) - (2*b*d*e*n*x^(-4 + r))/(4 - r)^2 - ((d^2/x^4 + (
2*e^2)/((2 - r)*x^(2*(2 - r))) + (8*d*e*x^(-4 + r))/(4 - r))*(a + b*Log[c*x^n]))/4

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^5} \, dx &=-\frac{1}{4} \left (\frac{d^2}{x^4}+\frac{2 e^2 x^{-2 (2-r)}}{2-r}+\frac{8 d e x^{-4+r}}{4-r}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac{-d^2 \left (8-6 r+r^2\right )+8 d e (-2+r) x^r+2 e^2 (-4+r) x^{2 r}}{4 (2-r) (4-r) x^5} \, dx\\ &=-\frac{1}{4} \left (\frac{d^2}{x^4}+\frac{2 e^2 x^{-2 (2-r)}}{2-r}+\frac{8 d e x^{-4+r}}{4-r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{(b n) \int \frac{-d^2 \left (8-6 r+r^2\right )+8 d e (-2+r) x^r+2 e^2 (-4+r) x^{2 r}}{x^5} \, dx}{4 \left (8-6 r+r^2\right )}\\ &=-\frac{1}{4} \left (\frac{d^2}{x^4}+\frac{2 e^2 x^{-2 (2-r)}}{2-r}+\frac{8 d e x^{-4+r}}{4-r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{(b n) \int \left (-\frac{d^2 (-4+r) (-2+r)}{x^5}+8 d e (-2+r) x^{-5+r}+2 e^2 (-4+r) x^{-5+2 r}\right ) \, dx}{4 \left (8-6 r+r^2\right )}\\ &=-\frac{b d^2 n}{16 x^4}-\frac{b e^2 n x^{-2 (2-r)}}{4 (2-r)^2}-\frac{2 b d e n x^{-4+r}}{(4-r)^2}-\frac{1}{4} \left (\frac{d^2}{x^4}+\frac{2 e^2 x^{-2 (2-r)}}{2-r}+\frac{8 d e x^{-4+r}}{4-r}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.302773, size = 121, normalized size = 0.9 \[ \frac{a \left (-4 d^2+\frac{32 d e x^r}{r-4}+\frac{8 e^2 x^{2 r}}{r-2}\right )+4 b \log \left (c x^n\right ) \left (-d^2+\frac{8 d e x^r}{r-4}+\frac{2 e^2 x^{2 r}}{r-2}\right )+b n \left (-d^2-\frac{32 d e x^r}{(r-4)^2}-\frac{4 e^2 x^{2 r}}{(r-2)^2}\right )}{16 x^4} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x^5,x]

[Out]

(b*n*(-d^2 - (32*d*e*x^r)/(-4 + r)^2 - (4*e^2*x^(2*r))/(-2 + r)^2) + a*(-4*d^2 + (32*d*e*x^r)/(-4 + r) + (8*e^
2*x^(2*r))/(-2 + r)) + 4*b*(-d^2 + (8*d*e*x^r)/(-4 + r) + (2*e^2*x^(2*r))/(-2 + r))*Log[c*x^n])/(16*x^4)

________________________________________________________________________________________

Maple [C]  time = 0.234, size = 1924, normalized size = 14.3 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^r)^2*(a+b*ln(c*x^n))/x^5,x)

[Out]

-1/4*b*(-2*e^2*(x^r)^2*r+d^2*r^2-8*d*e*x^r*r+8*e^2*(x^r)^2-6*d^2*r+16*d*e*x^r+8*d^2)/x^4/(-2+r)/(-4+r)*ln(x^n)
-1/16*(b*d^2*n*r^4-12*b*d^2*n*r^3+256*ln(c)*b*d^2+52*b*d^2*n*r^2-96*b*d^2*n*r-128*I*Pi*b*e^2*r*csgn(I*c*x^n)^2
*csgn(I*c)*(x^r)^2-8*a*e^2*r^3*(x^r)^2+80*a*e^2*r^2*(x^r)^2+256*a*d^2+512*a*d*e*x^r+320*I*Pi*b*d*e*r*csgn(I*x^
n)*csgn(I*c*x^n)*csgn(I*c)*x^r+16*I*Pi*b*d*e*r^3*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x^r-128*I*Pi*b*d^2*csgn(I
*c*x^n)^3+24*I*Pi*b*d^2*r^3*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+192*I*Pi*b*d^2*r*csgn(I*x^n)*csgn(I*c*x^n)*csg
n(I*c)-24*I*Pi*b*d^2*r^3*csgn(I*x^n)*csgn(I*c*x^n)^2-24*I*Pi*b*d^2*r^3*csgn(I*c*x^n)^2*csgn(I*c)-128*I*Pi*b*e^
2*r*csgn(I*x^n)*csgn(I*c*x^n)^2*(x^r)^2+4*I*Pi*b*e^2*r^3*csgn(I*c*x^n)^3*(x^r)^2+320*I*Pi*b*d*e*r*csgn(I*c*x^n
)^3*x^r+16*I*Pi*b*d*e*r^3*csgn(I*c*x^n)^3*x^r-256*a*e^2*r*(x^r)^2+208*a*d^2*r^2-384*a*d^2*r+4*a*d^2*r^4-48*a*d
^2*r^3+64*b*d^2*n+128*b*d*e*n*x^r-8*ln(c)*b*e^2*r^3*(x^r)^2+512*ln(c)*b*d*e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*c)*x^r-16*I*Pi*b*d*e*r^3*csgn(I*x^n)*csgn(I*c*x^n)^2*x^r-16*I*Pi*b*d*e*r^3*csgn(I*c*x
^n)^2*csgn(I*c)*x^r+24*I*Pi*b*d^2*r^3*csgn(I*c*x^n)^3)/(-2+r)^2/x^4/(-4+r)^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^5,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.40894, size = 1088, normalized size = 8.06 \begin{align*} -\frac{{\left (b d^{2} n + 4 \, a d^{2}\right )} r^{4} + 64 \, b d^{2} n - 12 \,{\left (b d^{2} n + 4 \, a d^{2}\right )} r^{3} + 256 \, a d^{2} + 52 \,{\left (b d^{2} n + 4 \, a d^{2}\right )} r^{2} - 96 \,{\left (b d^{2} n + 4 \, a d^{2}\right )} r - 4 \,{\left (2 \, a e^{2} r^{3} - 16 \, b e^{2} n - 64 \, a e^{2} -{\left (b e^{2} n + 20 \, a e^{2}\right )} r^{2} + 8 \,{\left (b e^{2} n + 8 \, a e^{2}\right )} r + 2 \,{\left (b e^{2} r^{3} - 10 \, b e^{2} r^{2} + 32 \, b e^{2} r - 32 \, b e^{2}\right )} \log \left (c\right ) + 2 \,{\left (b e^{2} n r^{3} - 10 \, b e^{2} n r^{2} + 32 \, b e^{2} n r - 32 \, b e^{2} n\right )} \log \left (x\right )\right )} x^{2 \, r} - 32 \,{\left (a d e r^{3} - 4 \, b d e n - 16 \, a d e -{\left (b d e n + 8 \, a d e\right )} r^{2} + 4 \,{\left (b d e n + 5 \, a d e\right )} r +{\left (b d e r^{3} - 8 \, b d e r^{2} + 20 \, b d e r - 16 \, b d e\right )} \log \left (c\right ) +{\left (b d e n r^{3} - 8 \, b d e n r^{2} + 20 \, b d e n r - 16 \, b d e n\right )} \log \left (x\right )\right )} x^{r} + 4 \,{\left (b d^{2} r^{4} - 12 \, b d^{2} r^{3} + 52 \, b d^{2} r^{2} - 96 \, b d^{2} r + 64 \, b d^{2}\right )} \log \left (c\right ) + 4 \,{\left (b d^{2} n r^{4} - 12 \, b d^{2} n r^{3} + 52 \, b d^{2} n r^{2} - 96 \, b d^{2} n r + 64 \, b d^{2} n\right )} \log \left (x\right )}{16 \,{\left (r^{4} - 12 \, r^{3} + 52 \, r^{2} - 96 \, r + 64\right )} x^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^5,x, algorithm="fricas")

[Out]

-1/16*((b*d^2*n + 4*a*d^2)*r^4 + 64*b*d^2*n - 12*(b*d^2*n + 4*a*d^2)*r^3 + 256*a*d^2 + 52*(b*d^2*n + 4*a*d^2)*
r^2 - 96*(b*d^2*n + 4*a*d^2)*r - 4*(2*a*e^2*r^3 - 16*b*e^2*n - 64*a*e^2 - (b*e^2*n + 20*a*e^2)*r^2 + 8*(b*e^2*
n + 8*a*e^2)*r + 2*(b*e^2*r^3 - 10*b*e^2*r^2 + 32*b*e^2*r - 32*b*e^2)*log(c) + 2*(b*e^2*n*r^3 - 10*b*e^2*n*r^2
 + 32*b*e^2*n*r - 32*b*e^2*n)*log(x))*x^(2*r) - 32*(a*d*e*r^3 - 4*b*d*e*n - 16*a*d*e - (b*d*e*n + 8*a*d*e)*r^2
 + 4*(b*d*e*n + 5*a*d*e)*r + (b*d*e*r^3 - 8*b*d*e*r^2 + 20*b*d*e*r - 16*b*d*e)*log(c) + (b*d*e*n*r^3 - 8*b*d*e
*n*r^2 + 20*b*d*e*n*r - 16*b*d*e*n)*log(x))*x^r + 4*(b*d^2*r^4 - 12*b*d^2*r^3 + 52*b*d^2*r^2 - 96*b*d^2*r + 64
*b*d^2)*log(c) + 4*(b*d^2*n*r^4 - 12*b*d^2*n*r^3 + 52*b*d^2*n*r^2 - 96*b*d^2*n*r + 64*b*d^2*n)*log(x))/((r^4 -
 12*r^3 + 52*r^2 - 96*r + 64)*x^4)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**r)**2*(a+b*ln(c*x**n))/x**5,x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (e x^{r} + d\right )}^{2}{\left (b \log \left (c x^{n}\right ) + a\right )}}{x^{5}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^5,x, algorithm="giac")

[Out]

integrate((e*x^r + d)^2*(b*log(c*x^n) + a)/x^5, x)